package cn.taofuxn.sale.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * ProjectName : GeekSaleSystem
 * PackageName : cn.taofuxn.sale.config
 * Created by Wong
 * Date: 2018/4/13
 * Time: 10:05
 */
@Configuration
public class WebStaticResConfig extends WebMvcConfigurerAdapter{
	
	@Override
	public void addResourceHandlers(ResourceHandlerRegistry registry) {
//		将所有/web/** 访问都映射到classpath:/template/shop/ 目录下
		registry.addResourceHandler("/web/**").addResourceLocations("classpath:/template/shop/");
	}

//	@Override
//	public void addViewControllers(final ViewControllerRegistry registry) {
////		registry.addViewController("/").setViewName("sale");
//		registry.setOrder(Ordered.HIGHEST_PRECEDENCE);
//		super.addViewControllers(registry);
//	}
}
